package com.ruoyi.project.DataInfo.service.ServiceImpl;

import com.ruoyi.project.DataInfo.mapper.DataInfoMapper;
import com.ruoyi.project.DataInfo.service.IDataInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class DataInfoServiceImpl implements IDataInfoService {
    @Autowired
    DataInfoMapper dataInfoMapper;
    @Override
    public List<Map<String, String>> exist(Map<String,Object> map) {
        return dataInfoMapper.exist(map);
    }

    @Override
    public List<Map<String, String>> search(Map<String,Object> map) {
        return dataInfoMapper.search(map);
    }

    @Override
    public List<Map<String, String>> getYear(Map<String,Object> map) {
        return dataInfoMapper.getYear(map);
    }

    @Override
    public List<Map<String, String>> getMonth(Map<String,Object> map) {
        return dataInfoMapper.getMonth(map);
    }

    @Override
    public List<Map<String, String>> getMaxYM(Map<String,Object> map) {
        return dataInfoMapper.getMaxYM(map);
    }

    @Override
    public List<Map<String, String>> getCompany(Map<String, Object> map) {

        HashMap<String, String> m1 = new HashMap<>();
        HashMap<String, String> m2 = new HashMap<>();
        HashMap<String, String> m3 = new HashMap<>();
        m1.put("id","1");
        m1.put("text","怀柔");
        m2.put("id","2");
        m2.put("text","朝阳");
        m3.put("id","3");
        m3.put("text","海淀");
        ArrayList<Map<String, String>> list = new ArrayList<>();
        list.add(m1);
        list.add(m2);
        list.add(m3);
        return list;

        //        return dataInfoMapper.getCompany(map);
    }
}
